/*
 * @Author: 三岁小仙仙 scitctocdtu@qq.com
 * @Date: 2024-10-01 20:33:29
 * @LastEditors: 三岁小仙仙 scitctocdtu@qq.com
 * @LastEditTime: 2024-10-07 00:09:07
 * @FilePath: \demo\src\store\useDemoStore.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineStore } from "pinia"
import { ref } from "vue"
import { TAddress } from "@/pages/TravelAddressManagement/TravelAddressManagement"
import { TLumpSumCarFare } from "@/pages/LumpSumCarFareManagement/LumpSumCarFareManagement"
import { TTravelInfo } from "@/pages/AddTravelRecord/AddTravelRecord"

const TravelRecordLibraryStore = defineStore(
	"TravelRecordLibraryStore",
	() => {
		const PeopleLibrary = ref<string[]>([])
		const AddressLibrary = ref<TAddress[]>([])
		const LumpSumCarFareLibrary = ref<TLumpSumCarFare[]>([])
		const originalUnreimbursedList = ref<TTravelInfo[]>([])

		return {
			PeopleLibrary,
			AddressLibrary,
			LumpSumCarFareLibrary,
			originalUnreimbursedList,
		}
	},
	{ persist: true }
)

export default TravelRecordLibraryStore
export type { TAddress }
